import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Wode from '../views/Wode.vue'
import Gouwuche from '../views/Gouwuche.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    //路有 元数据
    meta:{
      isShowTab:true
    }
  },
  {
    path: '/about',
    name: 'About',
    component: () => import( '../views/About.vue'),
    meta:{
      isShowTab:true
    }
  },
  {
    path: '/gouwuche',
    name: 'Gouwuche',
    component: () => import( '../views/Gouwuche.vue'),
    meta:{
      isShowTab:false
    }
  },
  {
    path: '/wode',
    name: 'User',
    component: () => import( '../views/User.vue'),
    meta:{
      isShowTab:true
    }
	},
	{
		path:'/carts',
		name:'carts',
		component: ()=> import ('@/views/Carts'),
		meta:{
			isShowTab:true
		}
	},
	{
		path:'/user',
		name:'user',
		component: ()=> import ('@/views/User'),
		meta:{
			isShowTab:true
		}
	},
	{
		path:'/details',
		name:'details',
		component: ()=> import ('@/views/Details'),
		meta:{
			isShowTab:false
		}
	},
	{
		path:'/search',
		name:'search',
		component: ()=> import ('@/views/Search'),
		meta:{
			isShowTab:false
		}
	},
	{
		path:'/classlist',
		name:'classlist',
		component: ()=> import ('@/views/Classlist'),
		meta:{
			isShowTab:false
		}
	},
	{
		path:'/details2',
		name:'details2',
		component: ()=> import ('@/views/Details2'),
		meta:{
			isShowTab:false
		}
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
